package ex_inheritance;

import ex_class.Car;

public class PolymorphismExam {
	public static void testCar(Car car) {
		car.run();
		car.stop();
	}
	
	public static void main(String[] args) {
		Car k5 = new Car("K5", "흰색", true);
		k5.run();
		
		Car damas = new Truck("다마스", "검정", false, 1000);
		damas.run();
		//damas.convey();
		
		testCar(k5);
		testCar(damas);
	}
}
